﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>收款匹配规则</title>
    <script src="/js/header.js"></script>
    <link href="/lib/jquery/jquery-ui.min.css" rel="stylesheet" />
    <script src="/lib/jquery/jquery-ui.min.js"></script>
</head>
<body>
    <div class="data-wrap case">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
                <a class="btn btn-default btn-sm" data-modal="/view/depositmatchrule/edit.html?id=0" data-title="新增" data-width="452" data-height="540"><span class="glyphicon glyphicon-plus"></span> 新增</a>
            </div>
            <div class="pull-right">
            </div>
        </div>
        <div class="paging">
        </div>
    </div>
    <script type="text/x-dot-template" id="pagerTemplate">
        <div class="data-body data-scroll">
            <div class="data-view">
                <div class="data-div-view table-responsive">
                    <table class="table table-hover table-striped table-bordered">
                        <thead>
                            <tr>
                                <th class="t_l wd150">公司名称</th>
                                <th class="wd100">媒合时间(-分)</th>
                                <th class="wd100">媒合时间(分)</th>
                                <th class="t_l">收款银行</th>
                                <th class="t_l wd250">交易类型</th>
                                <th class="t_l wd125">推送条件</th>
                                <th class="t_l wd200">媒合规则</th>
                                <th class="t_l wd250">备注</th>
                                <th class="wd200">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{? it.tData && it.tData.length>0}}
                            {{~it.tData :item:index}}
                            <tr>
                                <td class="t_l wd150" title="{{= item.companyNameEn }}">{{?  item.companyName!=null}}{{= item.companyName }}{{??}}{{?}}</td>
                                <td class="wd100">{{?  item.matchMinusMinute<0}}{{= item.matchMinusMinute }}{{??}}{{?}}</td>
                                <td class="wd100">{{?  item.matchMinute!=null}}{{= item.matchMinute }}{{??}}{{?}}</td>
                                <td class="t_l" title="{{?  item.matchBankCode!=null}}{{= item.matchBankCode }}{{??}}{{?}}">{{?  item.matchBankCode!=null}}{{= item.matchBankCode }}{{??}}{{?}}</td>
                                <td class="t_l wd250" title="{{= item.matchTranstypeName }}">{{= item.matchTranstypeName }}</td>
                                <td class="t_l wd125">
                                    {{? item.matchPushRule==1 }}
                                    匹配成功
                                    {{?? item.matchPushRule==2}}
                                    匹配失败
                                    {{?? item.matchPushRule==3}}
                                    匹配成功,匹配失败
                                    {{? }}
                                </td>
                                <td class="t_l wd200" title="{{=item.matchRule}}">{{=item.matchRule}}</td>
                                <td class="t_l wd250" title="{{? item.matchRemark!=null}}{{= item.matchRemark }}{{??}}{{?}}">{{? item.matchRemark!=null}}{{= item.matchRemark }}{{??}}{{?}}</td>
                                <td class="wd200">
                                    <button type="button" class="btn btn-default btn-xs" data-modal="/view/depositmatchrule/edit.html?id={{= item.id}}" data-title="编辑 - {{= item.companyName }}" data-width="452" data-height="560">
                                        <span class="glyphicon glyphicon-edit"></span> 编辑
                                    </button>
                                    <a class="btn btn-danger btn-xs" data-confirm='"{{= item.companyName }}" <br>确定要<span class="red">删除</span>该记录？' data-href="/DepositMatchRule/DepositMatchRuleDelete?id={{= item.id}}"><span class="glyphicon glyphicon-trash"></span> 刪除</a>
                                    <button type="button" class="btn btn-default btn-xs" data-modal="/view/depositmatchrule/copy.html?id={{= item.id}}" data-title="复制 - {{= item.companyName }}" data-width="452" data-height="560">
                                        <span class="glyphicon glyphicon-edit">复制</span> 
                                    </button>
                                </td>
                            </tr>
                            {{~}}
                            {{??}}
                            <tr class="noRecord">
                                <td colspan="8">暂无记录！</td>
                            </tr>
                            {{?}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        //菜单状态
        var menuStatus ={
            show: 1,
            hide: 2
        };
        $(function () {
            FlashPay.UI.DataAutoHeight();
            FlashPay.UI.DoSearch();

            $("#btnSearch").click(function () {
                window.currentPage = null;
                doSearch();
            });
        });

        $(document).keyup(function (event) {
            var keycode = event.which;
            if (keycode == 13) {
                FlashPay.UI.DoSearch();
            }
        });

        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }

        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "pagerTemplate", pageSize: 15, ajax: { url: '/DepositMatchRule/GetPager'} });
        }
    </script>
</body>
</html>